package com.ccdc.lbcmsystem.mapper;

import com.ccdc.lbcmsystem.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@Mapper
@Component
public interface ExamineMapper {
    //查询注册审核状态的用户
    List<User> queryRegUsers();
    //通过审核 状态码设置为1
    int agreeRegUser(@RequestParam("id") Integer id,@RequestParam("examineStatus") String examineStatus,
                     @RequestParam("examineUser") String examineUser);
    //通过用户名来查询
    List<User> queryListUsersByUserName(@RequestParam("userName") String userName);

    //查询待审核删除的儿童
    List<Delchildren> queryDelChildrenList();

    //查询待审核删除的退伍军人
    List<Delveteran> queryDelVeteranList();

    //查询待审核删除的独居老人
    List<Delelderly> queryDelElderlyList();

    //删除未通过审核的用户
    int delUnPassUser(@RequestParam("id")Integer id);

    //查询所有未审核的礼品信息
    List<Gift> queryUnauditedGiftList();

    List<Gift> queryUnauditedGiftByName(@RequestParam("name") String name);

    int agreeGift(Integer id,@RequestParam("processStatus") Integer processStatus,@RequestParam("statusPerson") String statusPerson,@RequestParam("processTime") String processTime);

    //新增留守儿童
    int addDelChildren(@RequestParam("delchildren") Delchildren delchildren);

    int addDelVeteran(@RequestParam("delveteran") Delveteran delveteran);

    int addDelElderly(@RequestParam("delelderly") Delelderly delelderly);

    Delchildren queryDelChildren(@RequestParam("id") Integer id);

    Delelderly queryDelElderly(@RequestParam("id") Integer id);

    Delveteran queryDelveteran(@RequestParam("id") Integer id);

    //修改审核后的删除状态码
    int updateDelChildrenById(@RequestParam("id") Integer id,@RequestParam("deleteStatus") Integer deleteStatus,
                              @RequestParam("examineUser") String examineUser);

    //通过姓名来进行查询
    List<Delchildren> queryListDelChildrenByName(@RequestParam("name") String name);

    //通过姓名来进行查询
    List<Delveteran> queryListDelVeteranByName(@RequestParam("name") String name);

    //通过姓名来进行查询
    List<Delelderly> queryListDelElderlyByName(@RequestParam("name") String name);

    //根据ID删除
    int DelChildrenById(@RequestParam("id") Integer id);

    //根据ID删除
    int DelVeteranById(@RequestParam("id") Integer id);

    //根据ID删除
    int DelElderlyById(@RequestParam("id") Integer id);

    //查询注销审核中的工作人员账号
    List<User> queryCancelExamineUsers(@RequestParam("role") String role, @RequestParam("cancellationStatus") String cancellationStatus);
    //查询注销审核中的所有账号
    List<User> queryCancelExamineUser(@RequestParam("cancellationStatus") String cancellationStatus);

    //拒绝注销请求
    int agreeCancel(@RequestParam("id") Integer id,@RequestParam("cancellationStatus") String cancellationStatus);
}
